Skip to content

Refactor cart store to improve Apollo cache updates #1519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 3, 2025
Merged

Conversation

w3bdesign
Copy link
Owner

Switches from useAsyncQuery to useQuery for cart data with improved fetch policies. Removes refetchQueries from mutations and instead explicitly refetches the cart after add/update operations to ensure cache consistency. Also updates error handling to always refetch the cart on mutation errors.

Switches from useAsyncQuery to useQuery for cart data with improved fetch policies. Removes refetchQueries from mutations and instead explicitly refetches the cart after add/update operations to ensure cache consistency. Also updates error handling to always refetch the cart on mutation errors.
@w3bdesign w3bdesign self-assigned this Jul 3, 2025
Copy link

vercel bot commented Jul 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nuxtjs-woocommerce ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2025 8:27pm

Reformatted the useQuery call to improve readability by placing each argument on a separate line and updating quote style for consistency.
Copy link

sonarqubecloud bot commented Jul 3, 2025

@w3bdesign w3bdesign merged commit fe1a947 into master Jul 3, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant